CFLAGS=-shared -fPIC -D_REENTRANT -I/usr/lib/jvm/default-java/include/ -I/usr/lib/jvm/default-java/include/linux 
all:Sample1.class libSample1.so

Sample1.class:Sample1.java
	javac Sample1.java
libSample1.so:Sample1.c Sample1.h
	gcc $(CFLAGS) Sample1.c -o libSample1.so
Sample1.h:Sample1.java
	javah Sample1

.PHONY:clean
clean:
	rm Sample1.class libSample1.so Sample1.h
